/**
 *
 */
package com.chrisandjo.rostra.domain;

import com.googlecode.instinct.integrate.junit4.InstinctRunner;
import com.googlecode.instinct.marker.annotate.BeforeSpecification;
import com.googlecode.instinct.marker.annotate.Specification;
import com.googlecode.instinct.marker.annotate.Subject;
import static org.junit.Assert.assertEquals;
import org.junit.runner.RunWith;

/**
 * @author Chris
 */
@RunWith(InstinctRunner.class)
public class APerson {
    @Subject private Person person;

    @BeforeSpecification
    public void setUpPerson() {
        person = new PersonEntity();
    }

    @Specification
    public void mustSetTheNameInSetter() {
        person.setName("Chris");
        assertEquals("Chris", person.getName());
    }

    @Specification
    public void mustSetNameWithConstructor() {
        Person person = new PersonEntity("Chris");
        assertEquals("Chris", person.getName());
    }

    @Specification
    public void mustSetTheId() {
        person.setId(3);
        assertEquals(3L, person.getId());
    }
}
